home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 004-kdeapps.lzm / usr / bin / gdlib-config < prev    next >
Encoding:
Text File  |  2007-06-28  |  2.5 KB  |  97 lines

  1. #!/bin/sh
  2. #
  3. # Return information about the local GD library installation
  4. #
  5. # Modeled after pdflib-config
  6.  
  7. # installation directories
  8. prefix=/usr
  9. exec_prefix=${prefix}
  10. libdir=${exec_prefix}/lib
  11. includedir=${prefix}/include
  12. bindir=${exec_prefix}/bin
  13.  
  14. usage()
  15. {
  16.     cat <<EOF
  17. Print information on GD library's version, configuration, and use.
  18. Usage: gdlib-config [options]
  19. Options:
  20.     --libdir          # directory where GD library is installed
  21.     --includedir      # directory where GD library headers are installed
  22.     --version         # complete GD library version string
  23.     --majorversion    # GD library major version number
  24.     --minorversion    # GD library minor version number
  25.     --revision        # GD library revision version number
  26.     --ldflags         # options required for linking against GD library
  27.     --libs            # libs required for linking against GD library
  28.     --cflags          # options required for compiling GD library apps
  29.     --includes        # same as --cflags
  30.     --features        # lists optional features compiled into gd, separated
  31.                           # by spaces. Currently (as of 2.0.26) the optional
  32.                           # features are GD_PNG, GD_JPEG, GD_XPM, and
  33.                           # GD_FREETYPE. When these features are reported by
  34.                           # --features, it is safe to include calls to the
  35.                           # related functions in your code.
  36.     --all             # print a summary of all GD library configure options
  37. EOF
  38.     exit $1
  39. }
  40.  
  41. if test $# -eq 0; then
  42.     usage 1 1>&2
  43. fi
  44.  
  45. while test $# -gt 0; do
  46.     case "$1" in
  47.     -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  48.     *) optarg= ;;
  49.     esac
  50.  
  51.     case $1 in
  52.     --libdir)
  53.     echo $libdir
  54.     ;;
  55.     --includedir)
  56.     echo $includedir
  57.     ;;
  58.     --version)
  59.     echo 2.0.35
  60.     ;;
  61.     --majorversion)
  62.     echo 2
  63.     ;;
  64.     --minorversion)
  65.     echo 0
  66.     ;;
  67.     --revision)
  68.     echo 35
  69.     ;;
  70.     --ldflags)
  71.     echo   -L/usr/lib 
  72.     ;;
  73.     --libs)
  74.     echo -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm  
  75.     ;;
  76.     --cflags|--includes)
  77.     echo -I${prefix}/include
  78.     ;;
  79.     --features)
  80.     echo GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON
  81.     ;;
  82.     --all)
  83.     echo "GD library  2.0.35"
  84.     echo "includedir: $includedir"
  85.     echo "cflags:     -I${prefix}/include"
  86.     echo "ldflags:      -L/usr/lib "
  87.     echo "libs:       -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm  "
  88.     echo "libdir:     $libdir"
  89.     echo "features:   GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON"
  90.     ;;
  91.     *)
  92.     usage 1 1>&2
  93.     ;;
  94.     esac
  95.     shift
  96. done
  97.